Extensions of the theory of observational purity and a practical design for JML

نویسندگان

  • David R. Cok
  • Gary T. Leavens
چکیده

To prevent erratic behavior during runtime checking, JML only allows assertions to call pure, i.e., side-effect free, methods. However, JML’s notion of purity checking is too conservative. For example, Object’s equals method needs to be used in assertions, but some classes use side effects in their equals method to maintain hidden caches or to trigger lazy evaluation, and so these methods cannot be pure in JML’s sense. To handle such cases JML and similar interface specification languages need a less conservative notion of pure methods. In this paper we apply and slightly extend the existing theory of “observationally pure” methods to JML, and explain our language design. This design is practical and accommodates common uses. Our extension of current theory provides appropriate encapsulation combined with inheritance, invariants, method specifications, frame conditions, secret helper methods, and multiple sets of secret state locations. We also introduce a semantics for static analysis that preserves correctness without imposing non-interference.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Theoretical, Scientific and Practical Aspects of the Basic Stages of Cad Cam Designing of Centrifugal Pumps

Many theoretical and practical problems arise at different stages of the design/manufacturing process during development of a pump. The experience obtained in pump development proves that the quality of a pump depends on many factors, which should he satisfied to receive good results. At the same time, the theory of engineering design principles exists, which is applicable to designing various ...

متن کامل

Practical Step towards Sampling in Qualitative Research; Focused on Grounded Theory

Today, there is a growing trend towards qualitative research in different areas of academic investigations. However, students face difficulties in deciding on qualitative methods of research, because most of the literature on qualitative research focuses on the philosophical and theoretical aspects, and they hardly offer any practical guidelines. This problem is rooted in the essence of qualita...

متن کامل

Extensions to Study Electrochemical Interfaces - A Contribution to the Theory of Ions

In the present study an alternative model allows the extension of the Debye-Hückel Theory (DHT) considering time dependence explicitly. From the Electro-Quasistatic approach (EQS) done in earlier studies time dependent potentials are suitable to describe several phenomena especially conducting media as well as the behaviour of charged particles in arbitrary solutions acting as electrolytes. Thi...

متن کامل

Price Discount and Stochastic Initial Inventory in the Newsboy Problem

Many extension of the newsboy problem have been solved in the literature. One of those extensions solves a newsboy problem with stochastic initial inventory, earlier extensions have focused on quantity discounts offered by suppliers. An important practical extension would address a combination of the two pervious extensions. In this paper we consider a newsboy problem in which the suppliers off...

متن کامل

Observational Purity and Encapsulation

Practical specification languages for imperative and object-oriented programs, such as JML, Eiffel, and Spec#, allow the use of program expressions including method calls in specification formulas. For coherent semantics of specifications, and to avoid anomalies with runtime assertion checking, expressions in specifications and assertions are typically required to be weakly pure in the sense th...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008